<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <title>不包电支付电费</title>
    <link rel="stylesheet" href="../../css/reset.css" />
    <style>
        body {
            width: 100%;
            background-color: #f8f8f8;
            font-size: 0.28rem;
            height: auto;
            -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
            font-family: PingFangSC-Regular, sans-serif;
            color: #333333;
        }

        .elecDetail {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: center;
            padding: 0 0.3rem;
            box-sizing: border-box;
            background-color: #fff;
            padding-bottom: 0.5rem;
        }

        .showList {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            padding-top: 0.2rem;
        }

        .showList li {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.28rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(89, 89, 89, 1);
            padding: 0.1rem 0;
        }

        .showList li p {
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            font-size: 0.28rem;
            color: #262626;
        }

        .showList li p:first-of-type {
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            font-size: 0.28rem;
            color: #595959;
        }

        .showList li:not(:first-of-type) p:last-of-type {
            font-size: 0.28rem;
            font-family: PingFang SC;
            color: rgba(38, 38, 38, 1);
        }

        .arrNum {
            font-size: 0.22rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(210, 151, 10, 1);
            margin-left: 0.1rem;
        }

        .buttonBox {
            display: flex;
            display: -webkit-flex;
            width: 0.46rem;
            height: 0.46rem;
            align-items: center;
            justify-content: center;
            border-radius: 0.06rem;
            font-size: 0.26rem;
            background-color: #f7f7f7;
        }

        #inputNumber {
            display: inline-block;
            width: 1.2rem;
            background: rgba(243, 243, 243, 1);
            border-radius: 0.06rem;
            margin: 0 0.1rem;
            text-align: center;
            border: none;
            outline: none;
            font-size: 0.26rem;
        }

        .chooseElecBag {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            font-size: 0.26rem;
            margin-top: 0.2rem;
            background-color: #fff;
            padding: 0 0.3rem;
            box-sizing: border-box;
        }

        .chooseElecNum {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: flex-start;
        }

        .elecDaypay {
            width: 100%;
            height: 1.3rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            font-size: 0.24rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(153, 153, 153, 1);
            padding-top: 0.3rem;
            box-sizing: border-box;
        }

        .elecDaypay b:first-of-type {
            font-size: 0.3rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 1);
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: flex-start;
            margin-bottom: 0.2rem;
        }

        .elecDaypay b:last-of-type {
            width: 100%;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(153, 153, 153, 1);
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.24rem;
        }

        .elecDaypay b:first-of-type span:last-of-type {
            display: inline-block;
            width: 0.96rem;
            height: 0.28rem;
            line-height: 0.28rem;
            text-align: center;
            background-color: #f8ab05;
            color: #ffffff;
            font-size: 0.18rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(255, 255, 255, 1);
            margin-left: 0.1rem;
        }

        .chooseElecNum li {
            width: 1.5rem;
            height: 0.84rem;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: center;
            border-radius: 0.1rem;
            position: relative;
            margin-right: 0.22rem;
        }

        .chooseElecNum li:last-of-type {
            margin-right: 0;
        }

        .chooseElecNum li span {
            position: absolute;
            top: -0.1rem;
            right: -0.1rem;
            display: block;
            width: 0.8rem;
            height: 0.26rem;
            background: linear-gradient(91deg, rgba(251, 106, 62, 1), rgba(255, 138, 80, 1));
            border-radius: 0.13rem 0.13rem 0.13rem 0;
            font-size: 0.18rem;
            color: #ffffff;
            line-height: 0.26rem;
            text-align: center;
        }

        .chooseli {
            background: rgba(251, 210, 52, 0.08);
            border: 1px solid rgba(251, 210, 52, 1);
        }

        .nochooseli {
            background: #ffffff;
            border: 1px solid #DCDCDC;
        }

        .buyInput {
            width: 100%;
            height: auto;
            border-bottom: 1px solid #E5E5E5;
            margin-top: 0.2rem;
        }

        .inputNumEelec {
            display: inline-block;
            width: 100%;
            height: 0.8rem;
            outline: none;
            border: none;
            font-size: 0.26rem;
        }

        .bagsMoney {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: flex-end;
            justify-content: space-between;
            font-size: 0.28rem;
            font-family: PingFang SC;
            font-weight: bold;
            color: rgba(38, 38, 38, 1);
            padding: 0.3rem 0;
            box-sizing: border-box;
        }

        .bagsMoney span:last-of-type {
            color: rgba(246, 115, 17, 1);
        }

        .elecTips {
            width: 100%;
            height: 1.12rem;
            background: rgba(255, 210, 3, 0.04);
            font-size: 0.24rem;
            font-family: PingFang SC;
            font-weight: 400;
            color: rgba(158, 140, 63, 1);
            position: relative;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: flex-start;
            line-height: 0.34rem;
            padding: 0 0.4rem 0 0.5rem;
            box-sizing: border-box;
            margin-bottom: 0.3rem;
        }

        .elecTips img {
            position: absolute;
            left: 0.17rem;
            top: 0.28rem;
            width: 0.26rem;
            height: 0.26rem;
        }

        .chooseSuanli {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            padding: 0 0.3rem;
            box-sizing: border-box;
            background-color: #fff;
            margin-top: 0.2rem;
        }

        .inputBox {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: flex-start;
            padding: 0.3rem 0;
        }

        .inputBox img {
            width: 0.28rem;
            height: 0.28rem;
            margin-left: 0.1rem;
        }

        .inputChecked+label::before {
            content: " ";
            display: inline-block;
            width: 0.4rem;
            height: 0.4rem;
            box-sizing: border-box;
            background: url("../../image/checkimng.png") center center no-repeat;
            background-size: 100% 100%;
            padding: .1rem;
            border-radius: 0.03rem;
            margin-right: 0.1rem;
        }

        .inputChecked:checked+label::before {
            display: inline-block;
            width: 0.4rem;
            height: 0.4rem;
            box-sizing: border-box;
            background: url("../../image/iconxuangousuanlibao.png") center center no-repeat;
            background-size: 100% 100%;
            padding: .1rem;
            border: none;
            border-radius: 0.03rem;
            margin-right: 0.1rem;
        }

        .inputChecked {
            position: absolute;
            clip: rect(0, 0, 0, 0);
        }

        .inputBox label {
            display: flex;
            display: -webkit-flex;
            align-items: center;
            font-size: 0.28rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 1);
        }

        .suanlibaoText {
            width: 100%;
            height: auto;
            background: rgba(255, 253, 245, 1);
            font-size: 0.22rem;
            font-family: PingFang SC;
            font-weight: 400;
            color: rgba(158, 140, 63, 1);
            line-height: 0.36rem;
            padding: 0.1rem 0.35rem 0.1rem 0.3rem;
            box-sizing: border-box;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            justify-content: center;
            align-items: flex-start;
        }

        .choosePayMothed {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            padding: 0 0.3rem;
            box-sizing: border-box;
            margin-top: 0.2rem;
            background-color: #ffffff;
            padding-bottom: 0.28rem;
        }

        .payWay_Box {
            width: 100%;
            background: #fff;
            color: #181818;
            box-sizing: border-box;
        }

        .payWay_Box label {
            width: 100%;
            position: relative;
            border-bottom: 1px solid#e2e2e2;
            height: auto;
            display: block;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            padding: 0.3rem 0;
            box-sizing: border-box;
        }

        .payWay_Box label:last-child {
            border-bottom: 0;
        }

        input[type=radio] {
            border: 0;
            width: 0.44rem;
            height: 0.44rem;
            position: absolute;
            z-index: 2;
            right: 0;
            top: 50%;
            margin: 0;
            margin-top: -0.22rem;
            opacity: 0
        }

        .radioStyle {
            width: 0.44rem;
            height: 0.44rem;
            display: inline-block;
            background: #fff;
            border-radius: 50%;
            box-sizing: border-box;
            position: absolute;
            z-index: 1;
            right: 0;
            margin-top: -0.22rem;
            top: 50%;
            border: 0.01rem solid#656565;
        }

        input[type=radio]:checked+.radioStyle {
            border: 0;
            background: url("../../image/checknew.png") center center no-repeat;
            background-size: 100% 100%;
        }

        .payLogo {
            width: 0.56rem;
            vertical-align: middle;
            margin-left: 0.1rem;
            margin-right: 0.22rem
        }

        .payWayTxt {
            display: inline-block;
            width: 1.2rem;
            font-size: 0.28rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 1);
        }

        .this_leastM {
            margin-left: 1.04rem;
            font-size: 0.24rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(137, 137, 137, 1);
        }

        .choosePayMothed p {
            width: 100%;
            height: auto;
            padding: 0.24rem 0;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            font-size: 0.24rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(153, 153, 153, 1);
            border-bottom: 1px solid #e2e2e2;
        }

        .fixedButton {
            position: sticky;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 2.6rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-end;
            background-color: #fff;
            z-index: 100;
            box-sizing: border-box;
        }

        .showChoose {
            width: 100%;
            display: flex;
            display: -webkit-flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: flex-start;
            box-sizing: border-box;
            margin: 0.13rem 0;
            color: #898989;
            padding: 0 0.3rem;
            box-sizing: border-box;
            margin-top: 0.2rem;
        }

        .artcil {
            width: 5.44rem;
            height: auto;
            font-family: PingFang SC;
            font-weight: 400;
            color: rgba(38, 38, 38, 1);
            line-height: 0.6rem;
            margin-top: 0.32rem;
        }

        .showChoose label {
            display: flex;
            display: -webkit-flex;
            align-items: center;
            font-size: 0.23rem;
        }

        #checkOtherpay+label::before {
            content: " ";
            display: inline-block;
            width: 0.34rem;
            height: 0.34rem;
            box-sizing: border-box;
            background: url("../../image/onchengkd.png") center center no-repeat;
            background-size: 100% 100%;
            padding: .1rem;
            border-radius: 0.03rem;
            margin-right: 0.1rem;
        }

        #checkOtherpay:checked+label::before {
            display: inline-block;
            width: 0.34rem;
            height: 0.34rem;
            box-sizing: border-box;
            background: url("../../image/checkeasd.png") center center no-repeat;
            background-size: 100% 100%;
            padding: .1rem;
            border: none;
            border-radius: 0.03rem;
            margin-right: 0.1rem;
        }

        .showclick {
            color: #FAA842;
        }

        .sunmitNum {
            width: 100%;
            height: 1.5rem;
            display: flex;
            display: -webkit-flex;
            align-items: stretch;
            border-top: 1px solid #E5E5E5;
        }

        .sunmitNum div {
            width: 5.5rem;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            padding: 0 0.3rem;
            box-sizing: border-box;
            font-size: 0.22rem;
            font-family: PingFang SC;
            font-weight: 400;
            color: rgba(153, 153, 153, 1);
            padding-bottom: 0.1rem;
        }

        #submitPay {
            border: none;
            outline: none;
            background-color: #ffd203;
            flex: 1;
            height: 1.5rem;
            line-height: 1.5rem;
            text-align: center;
            font-size: 0.3rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 1);
        }

        .elseRevenue {
            position: relative;
        }

        .elseRevenue .outCoinText {
            position: absolute;
            left: 0;
            bottom: -0.2rem;
            font-size: 0.22rem;
            font-family: PingFang SC;
            font-weight: 400;
            color: #999999;
        }

        .showEsRevenue {
            display: inline-block;
            width: 3.6rem;
            position: absolute;
            right: 0;
            bottom: -0.2rem;
            font-size: 0.22rem;
            font-family: PingFang SC;
            font-weight: 400;
            color: rgba(153, 153, 153, 1);
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: flex-end;
        }

        .calcNoArrie {
            width: 3.44rem;
            height: 0.97rem;
            background: rgba(255, 255, 255, 1);
            box-shadow: 0 0 0.1rem 0 rgba(202, 202, 202, 0.7);
            border-radius: 0.06rem;
            padding: 0.24rem 0.2rem;
            box-sizing: border-box;
            font-size: 0.2rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 1);
            line-height: 0.3rem;
            position: absolute;
            left: 20%;
            top: -1.2rem;
            z-index: 1;
        }

        .calcNoArrie .traginle {
            display: inline-block;
            width: 0;
            height: 0;
            border-left: 0.1rem solid transparent;
            border-right: 0.1rem solid transparent;
            border-top: 0.1rem solid #fff;
            position: absolute;
            left: 45%;
            bottom: -0.08rem;
        }

        .showPriceBoxNew {
            position: absolute;
            width: 4.5rem;
            height: 1.03rem;
            background: rgba(255, 255, 255, 1);
            box-shadow: 0 0 0.1rem 0 rgba(202, 202, 202, 0.7);
            border-radius: 0.06rem;
            right: -2.2rem;
            top: -1.2rem;
            font-size: 0.22rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 1);
            padding-left: 0.2rem;
            box-sizing: border-box;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
        }

        .showPriceBoxNew .traginlenew {
            display: inline-block;
            width: 0;
            height: 0;
            border-left: 0.1rem solid transparent;
            border-right: 0.1rem solid transparent;
            border-top: 0.1rem solid #ffffff;
            position: absolute;
            left: 45%;
            bottom: -0.08rem;
        }

        .showPriceBox {
            position: absolute;
            width: 4.5rem;
            height: 1.03rem;
            background: rgba(255, 255, 255, 1);
            box-shadow: 0 0 0.1rem 0 rgba(202, 202, 202, 0.7);
            border-radius: 0.06rem;
            left: -2rem;
            top: -1.2rem;
            font-size: 0.22rem;
            font-family: PingFang SC;
            font-weight: 500;
            color: rgba(38, 38, 38, 1);
            padding-left: 0.2rem;
            box-sizing: border-box;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
        }

        .showPriceBox .traginlenew {
            display: inline-block;
            width: 0;
            height: 0;
            border-left: 0.1rem solid transparent;
            border-right: 0.1rem solid transparent;
            border-top: 0.1rem solid #ffffff;
            position: absolute;
            left: 48%;
            bottom: -0.08rem;
        }

        .chooseConPon {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            padding: 0 0.3rem;
            box-sizing: border-box;
            background-color: #fff;
            margin: 0.2rem 0;
            font-size: 0.28rem;
            font-family: PingFang SC;
        }

        .chooseConPon p {
            width: 100%;
            height: auto;
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.3rem 0;
            box-sizing: border-box;
        }

        .chooseConPon p span {
            display: flex;
            display: -webkit-flex;
            align-items: center;
            justify-content: space-between;
        }

        .chooseConPon p:first-of-type {
            border-bottom: 1px solid #E5E5E5;
        }

        .aui-switch {
            width: 1rem;
            height: 0.54rem;
            position: relative;
            vertical-align: top;
            border: 1px solid #dddddd;
            background-color: #dddddd;
            border-radius: 0.54rem;
            background-clip: content-box;
            display: inline-block;
            outline: none;
            -webkit-appearance: none;
            appearance: none;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            -webkit-background-clip: padding-box;
            background-clip: padding-box;
            -webkit-transition: all 0.2s linear;
            transition: all 0.2s linear;
        }

        .aui-switch:before {
            width: 0.53rem;
            height: 0.53rem;
            position: absolute;
            top: -0.01rem;
            left: -0.02rem;
            border-radius: 0.5rem;
            background-color: #fff;
            content: "";
            -webkit-transition: left 0.2s;
            transition: left 0.2s;
        }

        .aui-switch:checked {
            border-color: #ffd203;
            background-color: #ffd203;
        }

        .aui-switch:checked:before {
            left: 0.42rem;
        }
    </style>
</head>

<body>
    <div class="elecDetail">
        <ul class="showList">
            <li>
                <p>
                    用户名
                </p>
                <p class="userPhone">
                    --
                </p>
            </li>
            <li>
                <p>
                    名称
                </p>
                <p class="machineName">
                    --
                </p>
            </li>
            <li>
                <p>
                    单份价格
                </p>
                <p class="unitPricePower">
                    0.00 CNY
                </p>
            </li>
            <li>
                <p>
                    购买份额 <span class="arrNum">1~1000份</span>
                </p>
                <p style="align-items: stretch;">
                    <span class="addbButton buttonBox">－</span>
                    <input type="text" id="inputNumber" value="1">
                    <span class="disButton buttonBox">＋</span>
                </p>
            </li>
            <li>
                <p>
                    BTC算力
                </p>
                <p class="getPower">
                    0T
                </p>
            </li>
            <li class="showBhpPower" style="display: none;">
                <p style="position: relative;" class="showTiggClassBhp">
                    BHP参配算力 <img src="../../image/iconjieshaoshiyix.png"
                        style="width:0.29rem;margin-left:0.3rem;margin-bottom: 0.1rem;">
                    <b class="calcNoArrie" style="display: none;">
                        算龄未达到1000 TD，算龄达标前
                        只有单挖产出
                        <span class="traginle">

                        </span>
                    </b>
                </p>
                <p class="getbhpPower">
                    0T
                </p>
            </li>
            <li>
                <p>
                    合约到期日
                </p>
                <p class="crantactEndTime">
                    0000-00-00 00:00:00
                </p>
            </li>
            <li>
                <p>
                    算力金额
                </p>
                <p class="needNnitMoney" style="color: #F67311;">
                    0.00 CNY
                </p>
            </li>
            <li class="elseRevenue">
                <p>
                    <span style="position: relative;" class="showTiggClassNew">
                        合约期预计总收入 <img src="../../image/iconjieshaoshiyix.png"
                            style="width:0.29rem;margin-left:0.2rem;margin-bottom: 0.1rem;">
                        <span class="showPriceBoxNew" style="display:none;">
                            <span>
                                BTC对应币价:<span class="btcPriceTwo">--</span>CNY
                            </span>
                            <span>
                                BHP对应币价:<span class="bhpPriceTwo">--</span>CNY
                            </span>
                            <span class="traginlenew">
                            </span>
                        </span>
                    </span>

                    <span class="outCoinText">
                        *根据当前出币量计算，仅供参考
                    </span>
                </p>
                <p style="flex:1;justify-content: flex-end;">
                    <span class="estimatedRevenue">
                        -- CNY
                    </span>
                    <span class="showEsRevenue" style="visibility: hidden;">
                        对应币价: --
                    </span>
                </p>
            </li>
        </ul>
    </div>
    <div class="chooseElecBag">
        <p class="elecDaypay">
            <b>
                <span>
                    充值电费包
                </span>
                <span>
                    囤币必备
                </span>
            </b>
            <b>
                <span>
                    预计每日电费 <span class="todayEelePrice">0.00 CNY</span>
                </span>
                <span>
                    合约电价 <span class="elecPriceText">0.00 CNY</span>
                </span>
            </b>
        </p>
        <ul class="chooseElecNum">
            <!-- <li class="chooseli" data-value=30 data-discount="1">30</li>
            <li class="nochooseli" data-value=60 data-discount="0.999">60 <span>9.99折</span></li>
            <li class="nochooseli" data-value=90 data-discount="0.998">90 <span>9.98折</span></li>
            <li class="nochooseli" data-value=180 data-discount="0.997">180 <span>9.97折</span></li> -->
        </ul>
        <p class="buyInput">
            <input type="text" placeholder="自定义充值天数(最少充值10天)" class="inputNumEelec">
        </p>
        <p class="bagsMoney">
            <span>
                电费包金额
            </span>
            <span class="payMoney">
                0.00CNY
            </span>
        </p>
        <p class="inputBox isPayElec" style="display:none;">
            <input type="checkbox" class="inputChecked" value="checkSuanlibao" name="chooseOutcoin" id="checkchargeBtc">
            <label for="checkchargeBtc" style="position: relative;">
                BTC抵扣电费
            </label>
        </p>
        <p class="suanlibaoText isPayElec" style="height: 1.5rem;display:none;margin-bottom: 0.2rem;">
            <!-- <img src="../../image/icondianfeijieshix.png"> -->
            电费包天数用完，矿机将停机没有产出，因BHP发放在BHPay钱包，目前仅支持BTC抵扣电费，预缴电费不足时，自动按实时汇率扣除BTC抵扣电费，每日24点自动扣除，请保持余额充足。
        </p>
    </div>
    <div class="chooseSuanli" style="display: none;">
        <p class="inputBox" style="justify-content: space-between;">
            <input type="checkbox" class="inputChecked" value="checkSuanlibao" name="chooseOutcoin" id="checkSuanlibao">
            <label for="checkSuanlibao" style="position: relative;">
                加配算力宝，收益享保障
            </label>
            <span
                style="width: 1.2rem;text-align: right;height: auto; font-size:0.24rem;font-family:PingFang SC;font-weight:500;text-decoration:underline;color:rgba(153,153,153,1);"
                class="showimgBoxs">
                规则
            </span>
        </p>
        <p class="suanlibaoText">
            <span>
                1.每日分币后计算回本进度，回本进度=当前的累计产币量*实时币价/合约已支付金额
            </span>
            <span>
                2.合约期内，若回本进度达到100%，次日转入收益共享阶段，用户后续分币比例调整为70%
            </span>
            <span>
                3.合约到期，若回本进度仍不足100%，算力宝销售方以BTC向用户补足差额；
            </span>
            <span>
                4.加购算力宝需一次性充值合约期所有电费
            </span>
            <span>
                5.回本前，所有产出将被冻结，回本进度达到100%立即解冻
            </span>
        </p>
        <p class="bagsMoney" style="align-content: flex-end;">
            <span>
                算力宝金额
            </span>
            <span class="suanLiNum">
                --
            </span>
        </p>
        <p class="bagsMoney" style="margin-bottom: 0.1rem;">
            <span class="openDialog">
                达到保障率，委托自动卖币 <img src="../../image/iconshiyixasd.png" style="width:0.28rem;margin-bottom: 0.06rem;">
            </span>
            <span style="display: inline-block;">
                <input type="checkbox" class="aui-switch" id="chooseNewRuler" data-flag="false" />
            </span>
        </p>
    </div>
    <div class="chooseConPon">
        <p>
            <span>
                订单金额
            </span>
            <span class="payTotalMoney" style="color: #F67412;font-weight:bold;">
                0 CNY
            </span>
        </p>
        <p>
            <span>
                <img src="../../image/iconquanx.png" style="width:0.3rem;margin-right: 0.1rem;"> 优惠券
            </span>
            <span style="color: #9A9A9A;" class="goCouPonList">
                <span style="margin-left: 0.1rem;" class="couponMoneyNum">暂未选择</span> <img src="../../image/rightjt.png"
                    style="width:0.12rem;margin-left: 0.1rem;">
            </span>
        </p>
    </div>
    <div class="choosePayMothed">
        <p>
            选择支付方式
        </p>
        <div class="payWay_Box">
            <label for="wallet" id="walletPay">
                <img src="../../image/cnyiconimg.png" alt="" class="payLogo">
                <span class="payWayTxt">CNY</span>
                <span class="this_leastM">可用: <span class="userCnyNum"></span></span>
                <input type="radio" name="payWay" value="CNY" id="wallet" data-paymethod="RRM_CASH" checked>
                <span class="radioStyle"></span>
            </label>
            <label for="usdt" id="usdtPay">
                <img src="../../image/usdt.png" alt="" class="payLogo">
                <span class="payWayTxt">USDT</span>
                <span class="this_leastM">可用: <span class="userUsdtNum"></span></span>
                <input type="radio" name="payWay" id="usdt" value="USDT" data-paymethod="RRM_USDT">
                <span class="radioStyle"></span>
            </label>
        </div>
    </div>
    <div class="fixedButton">
        <div class="showChoose">
            <input type="checkbox" class="inputChecked" value="checkOtherpay" name="chooseOutcoin" id="checkOtherpay">
            <label for="checkOtherpay">
                我已阅读
            </label>
            <span class="showclick" style="margin-left: 0.1rem;">

            </span>
            <span class="suanlibaoClick" style="display: none;margin-left: 0.1rem;color: #FAA842;">

            </span>
        </div>
        <div class="sunmitNum">
            <div>
                <p style="font-size: 0.3rem;">
                    <span style="font-size:0.26rem;font-family:PingFang SC;font-weight:500;color:rgba(38,38,38,1);">
                        需付金额
                    </span>
                    <span class="needpayTotalMoney" style="color: rgba(246, 115, 17, 1);margin-left: 0.1rem;">
                        --
                    </span>
                </p>
                <p style="font-size:0.23rem;">
                    <span style="font-family:PingFang SC;font-weight:500;color:rgba(89,89,89,1);">
                        预计净收益
                    </span>
                    <span class="estimatedNetIncome" style="color:rgba(89,89,89,1);margin-left: 0.1rem;">

                    </span>
                    <span style="position: relative;" class="showTiggClass">
                        <img src="../../image/iconjieshaoshiyix.png" style="width:0.29rem;margin-left:0.1rem;">
                        <span class="showPriceBox" style="display:none;">
                            <span>BTC对应币价: <span class="btcPriceTwo">--</span> CNY
                            </span>
                            <span>
                                BHP对应币价: <span class="bhpPriceTwo">--</span> CNY
                            </span>
                            <span class="traginlenew">
                            </span>
                        </span>
                    </span>
                </p>
            </div>
            <button id="submitPay">
                立即支付
            </button>
        </div>
    </div>
    <script src="../../script/autosize.js"></script>
    <script src="../../script/jquery_three_two_one.js"></script>
    <script src="../../script/fastclick.js"></script>
    <script src="../../script/dotmin.js"></script>
    <script src="../../script/app.js"></script>
    <script>
        apiready = function () {
            var app = new APP();
            if (app.ST == "ios") {
                $("input").click(function () {
                    $(this).focus().select(); //保险起见，还是加上这句。
                });
            }
            var account = app.getAccount();
            var machineData = api.pageParam.machineData; //矿机详情
            var btcPrice = machineData.btc_price; //BTC市场价格
            var userAsets = api.pageParam.userAset; //用户资产
            var buyElecDays = 30; //充值电费包天数 默认30天 最大180天
            var usdtExchge = machineData.exchange_rate; //usdt兑换率
            var machineId = machineData.machine_id; //矿机id
            var validateTokenNew = ""; //同盾验证
            //**用户购买矿机份额默认1份*********************//打折 折扣数*******//每日矿机功耗  *****//到手总算力***//每日电费CNY*************************** //默认时间小时*************USDT**********每日电费
            var buyelecNum = machineData.minLimitNum || 1,
                discountNum = 1,
                powerWaste = 1,
                totalPower = machineData.base_power,
                elecPrice = app.accMoreMul(machineData.mine_power, 24, machineData.electric_price.CNY, machineData.computing_power), timeDay = 24, elecPriceUsdt = app.accMoreMul(machineData.mine_power, 24, machineData.electric_price.USDT, machineData.computing_power),
                timeDay = 24;
            var payMethod = "CNY"; //默认CNY支付
            var payAllNameMethod = "RRM_CASH"; //默认支付全名称
            var minBuyNum = machineData.minLimitNum || 1; //最小下单数量
            var usdt_unit_pay = 0, cny_unit_pay = 0; //单份USDT矿机价格 CNY矿机价格
            var userCnyNum = userAsets.CNY, userUsdtNum = userAsets.USDT; //用户资产CNY USDT
            var isUseCoupons = machineData.is_use_coupons;//是否能使用优惠券
            var couponMoney = 0, couponMoneyUsdt = 0;//选择优惠券抵扣钱数(满减,抵扣)
            var couponMoneyDisCharge = 1;//选择优惠券折扣数
            var chooseIdCoupon = "";//选择的优惠券ID
            var autoSell = 0;//自动卖币 0否 1是
            if (isUseCoupons == 1) {
                $(".isShowCoupons").show();
                var preferentialRate = machineData.preferential_rate;//优惠比例
            }
            app.setStorage("chooseCouponStore", {
                chooseId: [],
                chooseMonyCny: 0,
                chooseMonyUsdt: 0
            });
            //算力包单份价格 CNY  USDT
            var suanlibaoCnyPrice = 0, suanliUsdtPrice = 0, stopLossRate = 0;
            if (machineData.insurance) {
                suanlibaoCnyPrice = app.sliceNum(machineData.insurance.cny_deposit, 2)
                suanliUsdtPrice = app.sliceNum(machineData.insurance.usdt_deposit, 4);
                stopLossRate = app.accDiv(
                    machineData.insurance.stop_loss_rate,
                    100
                ); //算力包收益下限百分比
                $(".stopLossNum").text(machineData.insurance.stop_loss_rate);
                $(".suanlibaoClick").text(
                    "《" + machineData.insurance_contract.name + "》"
                );
            }
            $(".showclick").text("《" + machineData.contract[0].name + "》");
            //最大下单数量 库存 和 后台返回最大下单数量比较
            var maxBuyNum = machineData.productNum > machineData.maxLimitNum ? machineData.maxLimitNum : machineData.productNum;
            var maxBuyElecBags = machineData.constract_date_num; //自定义电费最大购买数
            var ischeckSuanli = false; //是否选中input;
            var totalPayMoney = 0; //总支付金额
            var elecCifg = machineData.electricity_config; //充值电费包数组
            $(".elecPriceText").text(
                "￥" + app.sliceNum(machineData.electric_price.CNY, 2) + "/度"
            );
            var btcPriceTwo = app.accMul(btcPrice, 2); //双倍BTC价格
            $(".showEsRevenue").text(
                "对应币价: " + btcPrice + "  ~ " + btcPriceTwo + " CNY"
            );
            $(".showEsRevenueNew").text(btcPrice + " ~ " + btcPriceTwo + " CNY");
            $(".openDialog").click(function () {
                var param = {
                    dtype: "dialog47",
                    data: {
                        text: "当收益达到保障率，算力宝销售方将把产币卖为USDT,<span style='color:#ED3434'>发放至BHPAY</span>",
                        underTexttips: "*实际成交价以市场价为准",
                        event: "openSellAuto"
                    }
                };
                app.dialog(param);
            })
            //监听关联Bhpay
            app.listen("goConnectnewBhpay", function () {
                app.checkStausOther(function (ret, err) {
                    var dataCheck = {
                        statusCode: ret.code,
                        statusText: ret.message
                    };
                    if (dataCheck.statusCode == 609 || dataCheck.statusCode == 614) {
                        app.toast("请去【安全设置-实名认证】进行实名");
                    } else if (dataCheck.statusCode == 602) {
                        app.toast("亲,你的信息正在审核中……");
                    } else if (dataCheck.statusCode == 200) {
                        app.getBhpayURL(account, function (ret) {
                            if (ret.code == 200) {
                                app.closeDialog();
                                app.openWin({
                                    name: "browser_headerwin",
                                    url: app.hd + "common/headerwin.html",
                                    pageParam: {
                                        subpage: ret.data,
                                        name: "browser",
                                        type: "remote",
                                        isremote: "true",
                                        title: "BHPay",
                                        openBHpay: 'true'
                                    }
                                });
                            } else {
                                app.toast(ret.message);
                            }
                        })
                    } else {
                        app.toast("请去【安全设置-实名认证】进行实名");
                    }
                })
            });
            function getOverTake() {
                var getbhpStore = app.bhpayIsLine();
                if (getbhpStore == "true") {
                    $("#chooseNewRuler").prop("checked", true);
                    autoSell = 1;

                    return
                }
                autoSell = 0;
                $("#chooseNewRuler").prop("checked", false);
                app.getBhpayAbout(function (ret) {
                    if (ret.code == 200 && ret.message == "success") {
                        app.bhpayIsLine("true");
                        autoSell = 1;
                        $("#chooseNewRuler").prop("checked", true);
                    } else {
                        autoSell = 0;
                        $("#chooseNewRuler").prop("checked", false);
                        app.bhpayIsLine("false");
                        var param = {
                            dtype: "dialog53",
                            data: {
                                title: '提示',
                                text: "自动卖出的币将发放至BHPAY，请先关联BHPAY账户",
                                cancel: 'cancel',
                                confirm: 'goConnectnewBhpay',
                                cancentxt: '取消',
                                confirmtxt: '关联BHPay',
                                stopPropagation: true,//阻止点击body冒泡
                            }
                        };
                        //提示公共弹窗
                        app.dialog(param);
                    }
                });
            };
            $("#chooseNewRuler").on("change", function (params) {
                if (!$("#checkSuanlibao").is(":checked")) {
                    app.toast("请先选择算力宝");
                    $("#chooseNewRuler").prop("checked", false);
                }
                var thisChecked = $(this).is(":checked");
                if (!thisChecked) {
                    $(this).prop("checked", false);
                    autoSell = 0;
                } else {
                    getOverTake();
                }
            })
            var unitElecBtcIncome = app.accDiv(
                machineData.predict_electricity,
                btcPrice
            ); //每日电费对应的BTC
            var totalTodayBtcNum = app.numSub(
                machineData.predict_income,
                unitElecBtcIncome
            ); //每次总收益BTC
            var regularDateNum = machineData.regular_date_num; //定期天数
            var elecArr = [];
            for (var i in elecCifg) {
                var thisValue = {
                    value: i,
                    disNum: app.numSub(1, elecCifg[i]),
                    disPre: app.accMul(app.numSub(1, elecCifg[i]), 10),
                    isshow: elecCifg[i] > 0 ? true : false,
                };
                elecArr.push(thisValue);
            }
            // console.log("**************" + JSON.stringify(elecArr));
            var textTemp = doT.template($("#coinTpl").text());
            $(".chooseElecNum").html(textTemp(elecArr));
            $("#inputNumber").val(minBuyNum);
            $(".machineName").text(machineData.name);
            $(".userPhone").text(account.telphone);
            $(".crantactEndTime").text(machineData.constract_end_date);
            $(".userCnyNum").text(userCnyNum);
            $(".userUsdtNum").text(userUsdtNum);
            $(".arrNum").text(machineData.minLimitNum + "~" + maxBuyNum + "份");
            for (var i = 0; i < machineData.good_deposit.length; i++) {
                if (machineData.good_deposit[i].pay_currency == "USDT") {
                    usdt_unit_pay = machineData.good_deposit[i].goods_deposit;
                }
                if (machineData.good_deposit[i].pay_currency == "CNY") {
                    cny_unit_pay = machineData.good_deposit[i].goods_deposit;
                }
            }
            if (machineData.good_deposit.length > 1) {
                $(".unitPricePower").text(cny_unit_pay + "CNY" + " / " + usdt_unit_pay + "USDT")
            } else {
                $(".unitPricePower").text(cny_unit_pay + "CNY");
            }
            $(".suanlibaoClick").click(function () {
                var param = {
                    dtype: "dialog391",
                    data: {
                        title: machineData.insurance_contract.name,
                        orderText: machineData.insurance_contract.content,
                        btns: [{
                            name: "我已阅读并同意",
                            event: "okRentMachine",
                        },],
                    },
                };
                app.dialog(param);
            });
            var btcPriceTwo = app.accMul(btcPrice, 2); //双倍BTC价格
            $(".btcPriceTwo").text(btcPrice + " ~ " + btcPriceTwo);
            if (machineData.bhp_price) {
                var bhpPriceTwo = app.accMul(machineData.bhp_price, 2); //双倍BHP价格
                $(".bhpPriceTwo").text(machineData.bhp_price + " ~ " + bhpPriceTwo);
            }
            $(".showimgBoxs").click(function () {
                var param = {
                    dtype: "dialog70",
                };
                app.dialog(param);
            });
            $(".showclick").click(function () {
                app.ajaxPro({
                    url: "machine/get-contact",
                    values: {
                        token: account.token,
                        code: machineData.contract[0].code,
                        machine_id: machineId,
                        num: buyelecNum,
                        currency: payAllNameMethod,
                    },
                    openFlower: true,
                }, function (ret) {
                    if (ret.code == 200) {
                        var param = {
                            dtype: "dialog391",
                            data: {
                                title: ret.data.contact.name,
                                orderText: ret.data.contact.content,
                                btns: [{
                                    name: "我已阅读并同意",
                                    event: "okRentMachine",
                                },],
                            },
                        };
                        app.dialog(param);
                    } else {
                        app.toast(ret.message);
                    }
                });
            });
            app.listen("okRentMachine", function () {
                $("#checkOtherpay").prop("checked", true);
            });
            var is_captcha = machineData.is_tongdun_on;
            //计算电费
            function electricityFees() {
                var a = 1; //初始化数据
                for (var i in arguments) {
                    a = app.accMul(a, arguments[i]);
                }
                return a;
            }
            //获取折扣数
            function getDischare(days) {
                var disNum = 1;
                for (var i = 0; i < elecArr.length; i++) {
                    if (days >= elecArr[i].value) {
                        disNum = elecArr[i].disNum;
                    }
                }
                return disNum;
            }
            var needPayNum = 0;//支付数量;
            //处理页面相关联的数据 租用数量 支付方式 选择天数
            function addExchang(rentNum, payMethod, chooseDay) {
                // console.log("rentNum*" + rentNum + "payMethod*" + "chooseDays*" + chooseDay + "elecPrice*" + elecPrice);
                var isCheckedInput = $("#checkSuanlibao").prop("checked");
                if (machineData.bhp_power > 0) {
                    $(".showBhpPower").show();
                    $(".getbhpPower").text(app.accMul(machineData.bhp_power, rentNum, 1158) + "T");
                }
                if (chooseDay < regularDateNum && machineData.is_pay_electric == 1) {
                    $(".isPayElec").show();
                } else {
                    $(".isPayElec").hide();
                }
                if (payMethod == "CNY") {
                    var todayElec = app.accMul(elecPrice, rentNum); //每份每日电费
                    $(".todayEelePrice").text(app.sliceNum(todayElec, 2) + payMethod);
                    $(".getPower").text(app.accMul(machineData.base_power, rentNum) + "T");
                    var payEelcMoney = app.sliceNum(electricityFees(rentNum, elecPrice, chooseDay, discountNum), 2); //选择电费包对应的总共电费
                    var regularpayEelcMoney = app.sliceNum(electricityFees(rentNum, elecPrice, regularDateNum), 2); //合约期总共电费
                    $(".payMoney").text(payEelcMoney + payMethod);
                    var minTotalRentMoney = app.sliceNum(app.accMul(rentNum, cny_unit_pay), 2);
                    $(".needNnitMoney").text(minTotalRentMoney + payMethod);
                    if (couponMoney > 0) {
                        $(".couponMoneyNum").text("已抵扣 " + app.sliceNum(couponMoney, 2) + payMethod).css("color", "#F67311");
                    } else {
                        $(".couponMoneyNum").text("暂未选择").css("color", "#999999")
                    }
                    var suanliMoney = 0;
                    if (ischeckSuanli) {
                        suanliMoney = app.sliceNum(electricityFees(rentNum, suanlibaoCnyPrice, totalPower), 2);
                    }
                    $(".suanLiNum").text(suanliMoney + payMethod);
                    totalPayMoney = app.sliceNum(app.moreAccAdd(payEelcMoney, minTotalRentMoney, suanliMoney), 2);
                    $(".payTotalMoney").text(totalPayMoney + payMethod);
                    var needPayMoney = app.sliceNum(app.numSub(totalPayMoney, couponMoney), 2);//需付金额(减去优惠券折扣)
                    needPayNum = needPayMoney;
                    $(".needpayTotalMoney").text(needPayMoney + payMethod);
                    var baozhangText = app.accAdd(minTotalRentMoney, payEelcMoney);
                    var baozhangNum = app.sliceNum(app.accMul(baozhangText, stopLossRate), 2);
                    if (machineData.insurance_id) {
                        $(".chooseSuanli").show();
                    }
                    $(".baozhangText").text(baozhangText + "*" + stopLossRate + "%=" + baozhangNum + payMethod);
                    var estimatedNetIncome = app.sliceNum(app.accMoreMul(machineData.predict_income, rentNum, regularDateNum), 2);
                    var maxestimatedNetIncome = app.sliceNum(app.accMul(estimatedNetIncome, 2), 2);
                    $(".estimatedRevenue").text(estimatedNetIncome + " ~ " + maxestimatedNetIncome + " CNY"); //预计净收益
                    var myIncomeCny = 0; //预计净收益不打折;
                    var myIncomeCnyMax = 0; //最大净收益打折
                    var suanLiLowerlimit = app.numSub(baozhangNum, baozhangText);
                    if (isCheckedInput) {
                        var thisDischarge = app.accMul(regularpayEelcMoney, getDischare(regularDateNum)); //CNY合约期电费打折
                        myIncomeCny = app.accAdd(app.accMoreSub(estimatedNetIncome, thisDischarge, minTotalRentMoney, suanliMoney), couponMoney); //预计净收益折扣;
                        myIncomeCnyMax = app.accAdd(app.accMoreSub(maxestimatedNetIncome, minTotalRentMoney, thisDischarge, suanliMoney), couponMoney);
                        if (Number(suanLiLowerlimit) <= Number(myIncomeCny)) {
                            $(".estimatedNetIncome").text(app.sliceNum(myIncomeCny, 2) + " ~ " + app.sliceNum(myIncomeCnyMax, 2) + " CNY");
                        } else {
                            myIncomeCny = app.accAdd(app.accMoreSub(estimatedNetIncome, regularpayEelcMoney, minTotalRentMoney, suanliMoney), couponMoney); //预计净收益;
                            $(".estimatedNetIncome").text(app.sliceNum(suanLiLowerlimit, 2) + " ~ " + app.sliceNum(myIncomeCnyMax, 2) + " CNY");
                        }
                    } else {
                        myIncomeCny = app.accAdd(app.accMoreSub(estimatedNetIncome, regularpayEelcMoney, minTotalRentMoney), couponMoney);
                        myIncomeCnyMax = app.accAdd(app.accMoreSub(maxestimatedNetIncome, minTotalRentMoney, regularpayEelcMoney), couponMoney);
                        $(".estimatedNetIncome").text(app.sliceNum(myIncomeCny, 2) + " ~ " + app.sliceNum(myIncomeCnyMax, 2) + " CNY");
                    }
                } else {
                    $(".getPower").text(app.accMul(machineData.base_power, rentNum) + "T");
                    var payEelcMoneyUsdt = app.sliceNum(electricityFees(rentNum, elecPriceUsdt, chooseDay, discountNum), 4); //计算选择电费包(折扣)
                    var regularpayEelcMoneyUsdt = app.sliceNum(electricityFees(rentNum, elecPriceUsdt, regularDateNum), 4); //计算合约期电费(无折扣)
                    $(".payMoney").text(payEelcMoneyUsdt + payMethod);
                    var minTotalRentMoneyUsdt = app.sliceNum(app.accMul(rentNum, usdt_unit_pay), 4);
                    $(".needNnitMoney").text(minTotalRentMoneyUsdt + payMethod);
                    var todayElecUsdt = app.accMul(elecPriceUsdt, rentNum);
                    $(".todayEelePrice").text(
                        app.sliceNum(todayElecUsdt, 4) + payMethod
                    );
                    var suanliMoney = 0;
                    if (ischeckSuanli) {
                        suanliMoney = app.sliceNum(electricityFees(rentNum, suanliUsdtPrice, totalPower), 4);
                    }
                    $(".suanLiNum").text(suanliMoney + payMethod);
                    totalPayMoney = app.sliceNum(app.moreAccAdd(payEelcMoneyUsdt, minTotalRentMoneyUsdt, suanliMoney), 4);
                    if (couponMoneyUsdt > 0) {
                        $(".couponMoneyNum").text("已抵扣 " + app.sliceNum(couponMoneyUsdt, 4) + payMethod).css("color", "#F67311");
                    } else {
                        $(".couponMoneyNum").text("暂未选择").css("color", "#999999")
                    }
                    $(".payTotalMoney").text(totalPayMoney + payMethod);
                    var needPayMoneyUsdt = app.sliceNum(app.numSub(totalPayMoney, couponMoneyUsdt), 4);//需付金额(减去优惠券折扣)
                    needPayNum = needPayMoneyUsdt;
                    $(".needpayTotalMoney").text(needPayMoneyUsdt + payMethod);
                    var baozhangTextUsdt = app.accAdd(minTotalRentMoneyUsdt, payEelcMoneyUsdt);
                    var baozhangNumUsdt = app.sliceNum(app.accMul(baozhangTextUsdt, stopLossRate), 2);
                    $(".baozhangText").text(baozhangTextUsdt + "*" + stopLossRate + "%=" + baozhangNumUsdt + payMethod);
                    var estimatedNetIncomeUsdt = app.sliceNum(app.accDiv(app.accMoreMul(machineData.predict_income, rentNum, regularDateNum), usdtExchge), 4);
                    var maxestimatedNetIncomeUsdt = app.sliceNum(app.accMul(estimatedNetIncomeUsdt, 2), 4);
                    $(".estimatedRevenue").text(estimatedNetIncomeUsdt + " ~ " + maxestimatedNetIncomeUsdt + " USDT"); //预计净收益
                    var myIncomeUsdt = 0; //预计净收益(折扣);
                    var myIncomeUsdtMax = 0; //最大净收益
                    var suanLiLowerlimitUsdt = app.numSub(baozhangNumUsdt, baozhangTextUsdt);
                    if (isCheckedInput) {
                        var thisDischargeUsdt = app.accMul(regularpayEelcMoneyUsdt, getDischare(regularDateNum)); //USDT合约期电费打折
                        myIncomeUsdt = app.accAdd(app.accMoreSub(estimatedNetIncomeUsdt, thisDischargeUsdt, minTotalRentMoneyUsdt, suanliMoney), couponMoneyUsdt); //预计净收益折扣;
                        myIncomeUsdtMax = app.accAdd(app.accMoreSub(maxestimatedNetIncomeUsdt, minTotalRentMoneyUsdt, thisDischargeUsdt, suanliMoney), couponMoneyUsdt);
                        if (Number(suanLiLowerlimitUsdt) <= Number(myIncomeUsdt)) {
                            $(".estimatedNetIncome").text(app.sliceNum(myIncomeUsdt, 4) + " ~ " + app.sliceNum(myIncomeUsdtMax, 4) + " USDT");
                        } else {
                            myIncomeUsdt = app.accAdd(app.accMoreSub(estimatedNetIncomeUsdt, regularpayEelcMoneyUsdt, minTotalRentMoneyUsdt, suanliMoney), couponMoneyUsdt); //预计净收益(无折扣);
                            $(".estimatedNetIncome").text(app.sliceNum(suanLiLowerlimitUsdt, 4) + " ~ " + app.sliceNum(myIncomeUsdtMax, 4) + " CNY");
                        }
                    } else {
                        myIncomeUsdt = app.accAdd(app.accMoreSub(estimatedNetIncomeUsdt, regularpayEelcMoneyUsdt, minTotalRentMoneyUsdt), couponMoneyUsdt);
                        myIncomeUsdtMax = app.accAdd(app.accMoreSub(maxestimatedNetIncomeUsdt, minTotalRentMoneyUsdt, regularpayEelcMoneyUsdt), couponMoneyUsdt);
                        $(".estimatedNetIncome").text(app.sliceNum(myIncomeUsdt, 4) + " ~ " + app.sliceNum(myIncomeUsdtMax, 4) + " USDT");
                    }
                }
            }
            addExchang(minBuyNum, payMethod, buyElecDays);
            //自定义购买电费天数
            var inputStartTime = 0;
            $(".inputNumEelec").on("input porpertychange", function (event) {
                inputStartTime = event.timeStamp;
                setTimeout(function () {
                    if (inputStartTime - event.timeStamp == 0) {
                        $(".chooseElecNum li")
                            .removeClass("chooseli")
                            .addClass("nochooseli");
                        var thisValue = Number($(".inputNumEelec").val());
                        if (thisValue < 10) {
                            thisValue = 10;
                            $(".inputNumEelec").val(10);
                        }
                        if (thisValue > maxBuyElecBags) {
                            thisValue = maxBuyElecBags;
                            $(".inputNumEelec").val(maxBuyElecBags);
                        }
                        discountNum = getDischare(thisValue);
                        buyElecDays = $(".inputNumEelec").val();
                        if (ischeckSuanli && buyElecDays < maxBuyElecBags) {
                            var param = {
                                dtype: "dialog11",
                                data: {
                                    text: '选购算力宝，需一次性支付<span style="color:#F67311">合约期（' + maxBuyElecBags + "天）</span>所有电费，已自动为您选择" + maxBuyElecBags + "天电费包，请重新核对需支付金额。",
                                    btns: [{
                                        name: "取消",
                                        event: "canalOt",
                                    }, {
                                        name: "确定",
                                        event: "goElecPayinput",
                                    },],
                                    stopPropagation: true,
                                },
                            };
                            app.dialog(param);
                            return;
                        }
                        addExchang(buyelecNum, payMethod, buyElecDays);
                    }
                }, 2000);
            });
            app.listen("goElecPayinput", function () {
                $("#checkSuanlibao").prop("checked", true);
                $(".inputNumEelec").val(maxBuyElecBags);
                $(".suanlibaoClick").show();
                buyElecDays = $(".inputNumEelec").val();
                discountNum = getDischare(buyElecDays);
                addExchang(buyelecNum, payMethod, buyElecDays);
            });
            $(".chooseElecNum").on("click", "li", function () {
                $(".inputNumEelec").val("");
                $(this).removeClass("nochooseli").addClass("chooseli").siblings("li").removeClass("chooseli").addClass("nochooseli");
                buyElecDays = $(this).data("value");
                if (ischeckSuanli && buyElecDays < maxBuyElecBags) {
                    var param = {
                        dtype: "dialog11",
                        data: {
                            text: '选购算力宝，需一次性支付<span style="color:#F67311">合约期(' +
                                maxBuyElecBags +
                                "天）</span>所有电费，已自动为您选择" +
                                maxBuyElecBags +
                                "天电费包，请重新核对需支付金额。",
                            btns: [{
                                name: "取消",
                                event: "canalOt",
                            }, {
                                name: "确定",
                                event: "goElecPay",
                            },],
                            stopPropagation: true,
                        },
                    };
                    app.dialog(param);
                    return;
                }
                discountNum = $(this).data("discount");
                addExchang(buyelecNum, payMethod, buyElecDays);
            });
            //改变份数时清空优惠券数据
            function clearCoupon(params) {
                if (couponMoney == 0) return
                couponMoney = 0, couponMoneyUsdt = 0, chooseIdCoupon = "";
                app.setStorage("chooseCouponStore", {
                    chooseId: [],
                    chooseMonyCny: 0,
                    chooseMonyUsdt: 0
                });
            }
            $(".addbButton").on("tap click", function () {
                var inputVal = $("#inputNumber").val();
                if (inputVal <= 1) return;
                if (inputVal > minBuyNum) {
                    inputVal--;
                }
                $("#inputNumber").val(inputVal);
                buyelecNum = $("#inputNumber").val();
                clearCoupon();
                addExchang(buyelecNum, payMethod, buyElecDays);
            });
            $(".disButton").on("tap click", function () {
                var inputVal = $("#inputNumber").val();
                if (maxBuyNum > inputVal) {
                    inputVal++;
                }
                $("#inputNumber").val(inputVal);
                buyelecNum = $("#inputNumber").val();
                clearCoupon();
                addExchang(buyelecNum, payMethod, buyElecDays);
            });
            //算力包选择
            $("#checkSuanlibao").on("change", function () {
                if (maxBuyElecBags < maxBuyElecBags) {
                    $(this).prop("checked", false);
                    return;
                }
                ischeckSuanli = $(this).prop("checked");
                if (ischeckSuanli == true) {
                    $(".suanlibaoClick").show();
                    if (buyElecDays < maxBuyElecBags) {
                        var param = {
                            dtype: "dialog11",
                            data: {
                                text: '选购算力宝，需一次性支付<span style="color:#F67311">合约期（' + maxBuyElecBags + "天）</span>所有电费，已自动为您选择" + maxBuyElecBags + "天电费包，请重新核对需支付金额。",
                                btns: [{
                                    name: "取消",
                                    event: "canalOt",
                                }, {
                                    name: "确定",
                                    event: "goElecPay",
                                },],
                                stopPropagation: true,
                            },
                        };
                        app.dialog(param);
                    }
                } else {
                    $("#chooseNewRuler").prop("checked", false);
                    $(".suanlibaoClick").hide();
                }
                addExchang(buyelecNum, payMethod, buyElecDays);
            });
            app.listen("canalOt", function () {
                $("#checkSuanlibao").prop("checked", false);
                $(".suanlibaoClick").hide();
                ischeckSuanli = false;
                addExchang(buyelecNum, payMethod, buyElecDays);
            });
            app.listen("goElecPay", function () {
                $("#checkSuanlibao").prop("checked", true);
                $(".chooseElecNum")
                    .find('li[data-value="' + maxBuyElecBags + '"]')
                    .click();
            });
            $("#inputNumber").on("input porpertychange", function (event) {
                inputStartTime = event.timeStamp;
                setTimeout(function () {
                    if (inputStartTime - event.timeStamp == 0) {
                        var thisValue = Number($("#inputNumber").val());
                        if (thisValue <= minBuyNum) {
                            $("#inputNumber").val(minBuyNum);
                        }
                        if (thisValue >= maxBuyNum) {
                            $("#inputNumber").val(maxBuyNum);
                        }
                        buyelecNum = $("#inputNumber").val();
                        clearCoupon();
                        addExchang(buyelecNum, payMethod, buyElecDays);
                    }
                }, 2000);
            });
            $(".payWay_Box input").on("change", function () {
                payMethod = $("input[name='payWay']:checked").val();
                payAllNameMethod = $("input[name='payWay']:checked").attr("data-paymethod");
                addExchang(buyelecNum, payMethod, buyElecDays);
            });
            function checkSubNum() {
                var ischeckArgee = $("#checkOtherpay").prop("checked");
                var checkElectric = $("#checkchargeBtc").prop("checked");
                if (!ischeckArgee) {
                    app.toast("请先确认协议");
                    return;
                }
                if ((payMethod == "CNY" && Number(needPayNum) > Number(userCnyNum)) || (payMethod == "USDT" && Number(needPayNum) > Number(userUsdtNum))) {
                    app.toast("余额不足，请先充值!");
                    return;
                }
                app.ajaxPro({
                    url: "order/rent",
                    values: {
                        token: account.token,
                        machine_id: machineId,
                        num: buyelecNum,
                        pay_channel: payAllNameMethod,
                        blackBox: is_captcha == 1 ? _fmOpt.getinfo() : "",
                        yzm_token: validateTokenNew,
                        is_insurance: ischeckSuanli ? 1 : 0,
                        electricity: buyElecDays,
                        is_pay_electric: checkElectric == true ? 1 : 0,
                        recordIds: chooseIdCoupon,
                        is_auto_mb: autoSell
                    },
                    openFlower: true,
                }, function (ret) {
                    if (ret.code == 200) {
                        app.toast("下单成功");
                    } else {
                        app.toast(ret.message);
                    }
                    setTimeout(function (params) {
                        app.trigger("elec_success");
                        app.tout(1000, function () {
                            app.closeW();
                        });
                    }, 2000);
                });
            }
            if (is_captcha == 1) {
                _fmOpt = {
                    display: "bind", //popup方式渲染验证码
                    container: "#submitPay", //验证码button渲染的目标DOM，自动展现方式下必需，详情见后文
                    area: ".customForm", //对于custom模式，弹出窗口的加载容器，详情见后文
                    partner: "renrenkj",
                    appName: "renrenkj_h5",
                    width: "6.9rem",
                    height: "0.88rem",
                    fmb: true,
                    initialTime: new Date().getTime(),
                    token: "renrenkj" +
                        "-" +
                        new Date().getTime() +
                        "-" +
                        Math.random().toString(16).substr(2),
                    env: 1,
                    getinfo: function () {
                        return "e3Y6ICIyLjUuMCIsIG9zOiAid2ViIiwgczogMTk5LCBlOiAianMgbm90IGRvd25sb2FkIn0=";
                    },
                };
                var fm = document.createElement("script");
                fm.type = "text/javascript";
                fm.src = ("https:" == document.location.protocol ? "https://" : "http://") + "static.tongdun.net/captcha/main/tdc.js?ver=1.0&t=" + (new Date().getTime() / 600000).toFixed(0);
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(fm, s);
                _fmOpt.onSuccess = function (validateToken) {
                    if (app.ST == "ios") {
                        app.onEvent("count", "excludingElectricity");
                    } else {
                        app.onEvent("count", "excludingElectricityanzhuo");
                    }
                    if (validateToken) {
                        validateTokenNew = validateToken;
                        checkSubNum();
                    } else {
                        _fmOpt.reset();
                    }
                };
            } else {
                $("#submitPay").click(function () {
                    if (app.ST == "ios") {
                        app.onEvent("count", "excludingElectricity");
                    } else {
                        app.onEvent("count", "excludingElectricityanzhuo");
                    }
                    checkSubNum()
                });
            }
            $(".showTiggClassBhp").click(function () {
                $(".calcNoArrie").slideToggle(100);
            })
            $(".showTiggClass").click(function () {
                $(".showPriceBox").slideToggle(100);
            })
            $(".showTiggClassNew").click(function () {
                $(".showPriceBoxNew").slideToggle(100);
            });
            $(".goCouPonList").click(function () {
                app.openWin({
                    name: "chooseCouponList",
                    url: app.hd + "common/headerwin.html",
                    pageParam: {
                        subpage: "rent/choosecoupon",
                        name: "chooseCouponList",
                        title: "选择优惠券",
                        unitMoney: cny_unit_pay,
                        unitMoneyUsdt: usdt_unit_pay,
                        payMethod: payMethod,
                        preferentialRate: preferentialRate,
                        rentNum: buyelecNum
                    }
                });
            });
            app.listen("chooseListInput", function (ret) {
                chooseIdCoupon = ret.value.chooseCouponId;
                var thisText = "";
                var chooseIdLength = chooseIdCoupon.length;
                //拼装数组把[1,2,3]改变成 1,2,3
                for (var i = 0; i < chooseIdLength; i++) {
                    if (i == chooseIdLength - 1) {
                        var item = chooseIdCoupon[i]
                    } else {
                        var item = chooseIdCoupon[i] + ","
                    }
                    thisText += item;
                }
                if (chooseIdLength > 0) {
                    chooseIdCoupon = thisText;
                } else {
                    chooseIdCoupon = "";
                }
                couponMoney = ret.value.chooseCouponMony;
                couponMoneyUsdt = ret.value.chooseCouponMonyUsdt;
                addExchang(buyelecNum, payMethod, buyElecDays);
            })
        };
    </script>
    <script type="text/html" id="coinTpl">
        {{~it:value:index}}
        <li class="{{=index==0?'chooseli':'nochooseli'}}" data-value={{=value.value}} data-discount={{=value.disNum}}>{{=value.value}} <span style="display:{{=value.isshow==false?'none':'inline-block'}}">{{=value.disPre}}折</span></li>
        {{~}}
    </script>
</body>

</html>